<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>新用户注册</title>
	<meta name="description" content="新用户注册" />

	<script type="text/javascript" src="${ctx }/js/plugs/jquery-ui-1.10.3.custom/js/jquery-1.10.1.js"></script>
	<script type="text/javascript" src="${ctx }/js/dw/responsive-width.js"></script>
	<script type="text/javascript" src="${ctx }/js/plugs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.js"></script>
	<link href="${ctx }/css/dw-user.css" rel="stylesheet" type="text/css" />

	<script src="${ctx}/js/plugs/jquery/jquery.cookie.js" type="text/javascript"></script>
	<link href="${ctx}/js/plugs/validate/jquery.validate.css" type="text/css" rel="stylesheet" />
	<script src="${ctx}/js/plugs/validate/jquery.validate.js" type="text/javascript"></script>
	<script src="${ctx}/js/plugs/validate/messages_cn.js" type="text/javascript"></script>
	<script src="${ctx }/js/plugs/validate/jquery.metadata.js" type="text/javascript"></script>
	<link rel="icon" href="/favicon.ico" type="image/x-icon" />

	<script type="text/javascript">
		$(document).ready(function(){

			var loginFormValidate=$("#loginForm").validate({
				rules:{
					username:{required:true,email:true,minlength:3,maxlength:60},
					//email:{required:true,email:true,maxlength:60},
					password:{required:true,minlength:6,maxlength:40}
				},
				messages: {
					username: {
						minlength:"不能少于3个字符！",
						maxlength:"不能超过60个字符！",
						email: "邮箱格式不正确！",
						required: "登录名不能为空！"
					},
					password:{
						required: "密码不能为空！"
					}
				},
				errorPlacement: function(error, element) {
					//error.appendTo(element.parent().parent());
					element.parent().append(error);
					//	$(element).css("borderColor","#C40000");
				}
			});

			var ckCodeError=$.cookie("registerError");
			if(ckCodeError!=null && ckCodeError=="0"){
				$("#register-error").text("验证码不正确!");
				$.removeCookie('registerError',{path:'/'});
			}

		});
	</script>
	<style type="text/css">
		label.error{
			display: block;
			margin-top: 3px;
		}
		#header{
			opacity:0.9;
		}
		#dwLoginContent{
			opacity:0.95;
		}
	</style>
</head>
<body style="background-color: #537088;">
<%@ include file="/WEB-INF/page/layouts/loginbgimg.jsp"%>

<div id="wrap" class="wrapLogin">

	<input type="hidden" id="id" name="id" value="${survey.id }">
	<input type="hidden" id="ctx" value="${ctx }">
<%--	<%@ include file="/WEB-INF/page/layouts/header.jsp"%>--%>
	<div style="clear: both;"></div>
	<div id="dwBody" >
		<div id="dwBodyContent" class="bodyCenter" style="background: none;">

			<div class="dw_login_logo">

				<h2 class="freg" style="width: 260px;border-top: 10px">输入个人信息完成注册</h2>
			</div>


			<shiro:guest>
				<div id="dwLoginContent">
					<div class="dlcTitleBg" ></div>
					<div class="dlcTitle" >
						<a href="#" class="dlcTitleTab crt" >注册</a>
					</div>

					<div class="loginFormContent">

						<form id="inputForm" action="${ctx }/reg/user-reg!save.action" method="post">
							<div id="loginTabContent" >

								<input type="hidden" name="id" value="${id }" >

								<div class="dlcLeft">

									<div class="frmItem">
										<label for="" class="frm_label">
											<span class="red-color">*&nbsp;</span>登录名</label>
										<div class="frm_controls">
											<input type="text"  class="frm-controlM" name="loginName" value="${loginName }"  >

										</div>
									</div>
									<div class="frmItem">
										<label for="" class="frm_label">
											<span class="red-color">*&nbsp;</span>昵称</label>
										<div class="frm_controls">
											<input type="text" class="frm-controlM" name="name" value="${name }"  >

										</div>
									</div>
									<div class="frmItem">
										<label for="" class="frm_label">
											<span class="red-color">*&nbsp;</span>邮箱</label>
										<div class="frm_controls">
											<input type="text" class="frm-controlM" name="email" value="${email }" >

										</div>
									</div>
									<div class="frmItem">
										<label for="" class="frm_label">
											<span class="red-color">*&nbsp;</span>密码</label>
										<div class="frm_conreg/user-reg!input.actiontrols">
											<input type="password" class="frm-controlM" name="pwd" value="" id="pwd">

										</div>
									</div>
									<div class="frmItem">
										<label for="" class="frm_label">
											<span class="red-color">*&nbsp;</span>电话</label>
										<div class="frm_controls">
											<input type="text"  class="frm-controlM" name="cellphone" value="${cellphone }"  >

										</div>
									</div>

									<div class="frmItem" style="padding: 6px 5px;">
										<label for="" class="frm_label">&nbsp;</label>
										<input type="submit"  value=" 注 册 " class="btnGreen addUser" style="width: 160px;height: 45px;" />
									</div>
									<div class="frmItem" style="padding: 6px 5px;">
										<label for="" class="frm_label">&nbsp;</label>
										<input href="${ctx }/login.jsp"   value=" 返 回 " class="btnGreen" style="width: 160px;height: 45px;" />
<%--										<a  class="btnGreen" style="width: 160px;height: 45px;" href="${ctx }/login.jsp"  class="btn-a-1">返回</a>--%>
<%--										<input type="submit"  value=" 返回 " class="btnGreen" style="width: 330px;height: 45px;" />--%>
									</div>

									<div class="frmItem" style="overflow: auto;padding: 6px 5px;">
										<label for="" class="frm_label">&nbsp;</label>
										<!-- <label class="frmItemLabel" style="float: left;">
                                            <input id="agree" name="agree" type="checkbox" checked="checked" style="color: color: #777;;">
                                        </label> -->
										<span class="ztagCheckbox checkedTrue">
									<%--<input id="c0" type="checkbox" name="rememberMe" value="true" checked="checked"></span>--%>
									<%--<a class="dw_style_a_1" tabindex="3" href="#">记住密码</a>--%>
									<%--<a class="dw_style_a_1" href="${ctx }/pwd/findPwd.jsp" target="_blank" style="float: right;">忘记密码</a>--%>
									</div>
									<!--
                                    <div class="frmItem" style="padding: 10px 5px;">
                                        <label for="" class="frm_label">&nbsp;</label>
                                        还没有账号&nbsp;&nbsp;<a href="">免费注册</a>
                                    </div> -->
								</div>
<%--								<div class="dlcRight">--%>
<%--									<%@ include file="/WEB-INF/page/layouts/admin-info.jsp"%>--%>
<%--								</div>--%>
							</div>
						</form>

					</div>
				</div>
			</shiro:guest>
			<shiro:user>
				<div id="dwLoginContent">
					<div class="dlcTitleBg" ></div>
					<div class="dlcTitle" style="padding: 17px;" >
						提示：已登录
					</div>

					<div class="loginFormContent">
						<div>
							<div style="margin: 80px auto;">
								<div style="padding-left: 100px;font-size: 20px;">
									亲爱的&nbsp;<span style="color:#497289;"><shiro:principal></shiro:principal></span>&nbsp;您已经登陆
									<span style="margin-left: 10px;"><a href="${ctx }/design/my-survey.action">问卷</a>&nbsp;&nbsp;</span>
									<a href="${ctx }/login!logout.action">退出登录</a>
								</div>
							</div>
							<div>
								<c:if test="${!empty param['una'] }">您没有相应的权限!</c:if>
							</div>
						</div>
					</div>
				</div>

			</shiro:user>
		</div>
	</div>

<%--	<div class="dw_foot" style="padding-top:15px;">--%>
<%--		<!-- 必须保留声明 start -->--%>
<%--		<div class="footer-copyright" style="color: gray;padding-top: 0px;font-size: 16px;">--%>
<%--			Powered by <a href="http://www.dwsurvey.net" style="text-decoration: none;color: gray;">DWSurvey</a>--%>
<%--			&nbsp;&nbsp;&nbsp;Copyright © 2012-2017--%>
<%--			<a href="http://www.diaowen.net" style="text-decoration: none;color: rgb(53, 117, 136);">调问网</a>--%>
<%--		</div>--%>
<%--		<!-- 必须保留声明 end -->--%>
<%--	</div>--%>

</div>
<script type="text/javascript">
	resizeBodyWidth();
	$(".dlcTit leBg").animate({opacity:0.6},0);
	$("a").attr("hidefocus",true);
</script>

<script type="text/javascript">

	$(document).ready(function(){

		var top=$(window).height()/2-320/2;
		var left=$(window).width()/2-550/2;
		//var A=window.open(url,"TencentLogin","top="+top+",left="+left+",width=550,height=320,menubar=0,scrollbars=1,resizable=1,status=1,titlebar=0,toolbar=0,location=1");

	});
</script>

<%--<script type="text/javascript">--%>
<%--	$(".addUser").click(function(){--%>
<%--		var thVal=$(this).text();--%>
<%--		var th=$(this);--%>
<%--		if(confirm("确定是否进行注册？")){--%>
<%--			var url=$(this).attr("href");--%>
<%--			var data="";--%>
<%--			$.ajax({--%>
<%--				url:url,--%>
<%--				data:data,--%>
<%--				type:'post',--%>
<%--				success:function(msg){--%>
<%--					window.location.href = "${ctx }/reg/user-reg!save.action";--%>
<%--				}--%>
<%--			});--%>
<%--		}--%>
<%--		return false;--%>
<%--	});--%>
<%--</script>--%>
</body>
</html>